﻿

<!--********************* Part1:Jsp Head *********************-->

<%@ page contentType="text/html;charset=UTF-8"%>  
<%@ include file="/framework/head.jsp"%>

<!--********************* Part2:Java Code *********************-->
<%
	ServerDownupfileInfoSearchEvent event = (ServerDownupfileInfoSearchEvent)context.getSessionValue("ServerDownupfileInfoSearchEvent");
    if (event.getOrderField().equals("ID") || event.getOrderField().equals("1") || event.getOrderField().equals(""))
    {
        event.setOrderField("CREATE_TIME");
        event.setOrderDesc(true);
    }
	ObjectList list = ServerDownupfileInfo.fetch().search(con,event);
%>

<!--********************* Part3:JavaScript Code ***************-->
<!--start 客户端脚本区域-->
<script language=javascript>

var list_code = "listServerDownupfileInfo";

function doSearch()
{

	//SetValue("s_Id",GetValue("i_Id")); //ID

	SetValue("s_Downloadtyp",GetValue("i_Downloadtyp")); //上传下载类型

	SetValue("s_WarehouseUincode",GetValue("i_WarehouseUincode")); //仓库统一编码

	SetValue("s_DatatableName",GetValue("i_DatatableName")); //数据表名

	SetValue("s_Parmstype",GetValue("i_Parmstype")); //参数类型

	SetValue("s_Parmsstr",GetValue("i_Parmsstr")); //参数时间

	SetValue("s_UpdownState",GetValue("i_UpdownState")); //上传下载状态
    SetValue("s_StartCreate",GetValue("i_StartCreate")); //最后修改开始时间
    SetValue("s_EndCreate",GetValue("i_EndCreate")); //最后修改结束时间

	//SetValue("s_Status",GetValue("i_Status")); //是否有效

	//SetValue("s_CreateUserId",GetValue("i_CreateUserId")); //创建人序号

	//SetValue("s_CreateUser",GetValue("i_CreateUser")); //创建人

	

	//SetValue("s_LastUpdateUserId",GetValue("i_LastUpdateUserId")); //最后修改人序号

	//SetValue("s_LastUpdateUser",GetValue("i_LastUpdateUser")); //最后修改人

	//SetValue("s_LastUpdateTime",GetValue("i_LastUpdateTime")); //最后修改时间
	

	SetValue("s_OrderField",GetValue("i_OrderField")); //排序
	SetValue("s_OrderDesc",getCheckBoxValues("i_OrderDesc")); //升降序
	doCommonSearch();
}

function bizViewServerDownupfileInfo(id)
{
	viewWin("<%=Config.getSrv()%>?action_code=viewServerDownupfileInfo&Id="+id);
}

function doDelete()
{
	if(!hasChooseRadio("ids"))
	{
		bizMessage("删除","服务器端上传下载信息表");
		return false;
	}
	if(!bizConfirm("删除","服务器端上传下载信息表")) return false;
	SetAction("deleteServerDownupfileInfo");
	frm.submit();
}

function doToAdd()
{
	SetAction("toAddServerDownupfileInfo");
	frm.submit();
}

function doToUpdate()
{
	if(!checkOne("ids")) 
	{
		bizMessage("修改","服务器端上传下载信息表");
		return false;
	}
	SetValue("Id",getCheckBoxValue("ids"));
	SetAction("toUpdateServerDownupfileInfo");
	frm.submit();
}
function doToCopy()
{
	if(!checkOne("ids")) 
	{
		bizMessage("复制","服务器端上传下载信息表");
		return false;
	}
	SetValue("Id",getCheckBoxValue("ids"));
	SetAction("toCopyServerDownupfileInfo");
	frm.submit();
}

function doGetFile(val)
{
    frmDown.action = "<%=Config.getWebPath()%>" +val;
    frmDown.target ="_blank";
    frmDown.submit();
    frmDown.target = "_self";
}

key_InitDefault();
key_RegSubmitHandler(doSearch);
</script>


<%=uiBody%>>

<%@ include file="/framework/menu.jsp"%>

<!--********************* Part4:Form  ***************-->
<form id=frm action="<%=Config.getSrv()%>" method="post">
<input type=hidden name="action_code" value="">
<input type=hidden name="Id" value="">
<input type=hidden name=sortOrder value="1">

<!--查询条件保留区域-->

<input type=hidden name="s_Downloadtyp" value="<%=event.getDownloadtyp()%>">  <!--上传下载类型-->

<input type=hidden name="s_WarehouseUincode" value="<%=event.getWarehouseUincode()%>"> <!--仓库统一编码-->

<input type=hidden name="s_DatatableName" value="<%=event.getDatatableName()%>"> <!--数据表名-->

<input type=hidden name="s_Parmstype" value="<%=event.getParmstype()%>"> <!--参数类型-->

<input type=hidden name="s_Parmsstr" value="<%=event.getParmsstr()%>"> <!--参数时间-->

<input type=hidden name="s_UpdownState" value="<%=event.getUpdownState()%>"> <!--上传下载状态-->
<!--  <input type=hidden name="s_CreateTime" value="<%=event.getCreateTime()%>"> --><!--创建时间-->
<input type=hidden name="s_StartCreate" value="<%=event.getStartCreate()%>"> <!--最后修改开始时间-->

<input type=hidden name="s_EndCreate" value="<%=event.getEndCreate()%>"> <!--最后修改结束时间-->
<!--  
<input type=hidden name="s_Status" value="<%=event.getStatus()%>">--> <!--是否有效-->
<!-- 
<input type=hidden name="s_CreateUserId" value="<%=event.getCreateUserId()%>">--> <!--创建人序号-->
<!-- 
<input type=hidden name="s_CreateUser" value="<%=event.getCreateUser()%>">--> <!--创建人-->


<!-- <input type=hidden name="s_Id" value="<%=event.getId()%>">--> <!--ID-->

<!-- <input type=hidden name="s_LastUpdateUserId" value="<%=event.getLastUpdateUserId()%>"> --><!--最后修改人序号-->
<!-- 
<input type=hidden name="s_LastUpdateUser" value="<%=event.getLastUpdateUser()%>">--> <!--最后修改人-->
<!-- 
<input type=hidden name="s_LastUpdateTime" value="<%=event.getLastUpdateTime()%>">--> <!--最后修改时间-->


<%@ include file="/framework/list_head.jsp"%>

<br>
<!--********************* Part5:Search Area ***************-->
<%=uiSearchStart%>>
<%
	int key_tab = 1 ;
%>


	<%=uiSearchInputTR%>>
		<%=uiSearchInputTDHead%>>
			
		上传下载类型：
       
         <%=SelectManager.viewDownOrLoad("i_Downloadtyp",event.viewDownloadtyp(),true,"",SelectManager.SELECT_ALL,"","key_tab="+(key_tab++))%> 
          <!--  <input type="text" class="texts" name="i_Downloadtyp" size="20" value="<%=event.viewDownloadtyp()%>" key_tab="<%=key_tab++%>"> -->
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;仓库名称：
     <%=SelectManager.viewWarehouseSelect(con,loginInfo.getLoginWarehouseCode(),"i_WarehouseUincode",event.viewWarehouseUincode(),true,"",SelectManager.SELECT_ALL,"","key_tab="+(key_tab++))%> 
           <!--  <input type="text" class="texts" name="i_WarehouseUincode" size="20" value="<%=event.viewWarehouseUincode()%>" key_tab="<%=key_tab++%>">-->
            
        </td>		
	</tr>

	<%=uiSearchInputTR%>>
		<%=uiSearchInputTDHead%>>
			
		&nbsp;&nbsp;&nbsp;&nbsp;数据表名：
        
            <input type="text" class="texts" name="i_DatatableName" size="20" value="<%=event.viewDatatableName()%>" key_tab="<%=key_tab++%>">
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;参数类型：
        <%=SelectManager.viewParmstype("i_Parmstype",event.viewParmstype(),true,"",SelectManager.SELECT_ALL,"","key_tab="+(key_tab++))%> 
           <!--   <input type="text" class="texts" name="i_Parmstype" size="20" value="<%=event.viewParmstype()%>" key_tab="<%=key_tab++%>">-->
        </td>		
	</tr>

	
	<%=uiSearchInputTR%>>
		<%=uiSearchInputTDHead%>>
			
		&nbsp;&nbsp;&nbsp;&nbsp;数据文件：
        
            <input type="text" class="texts" name="i_Parmsstr" size="20" value="<%=event.viewParmsstr()%>" key_tab="<%=key_tab++%>">
        &nbsp;&nbsp;&nbsp;&nbsp;上传下载状态：
        <%=SelectManager.viewUpdownState("i_UpdownState",event.viewUpdownState(),true,"",SelectManager.SELECT_ALL,"","key_tab="+(key_tab++))%> 
            <!-- <input type="text" class="texts" name="i_UpdownState" size="20" value="<%=event.viewUpdownState()%>" key_tab="<%=key_tab++%>"> -->
        
        </td>		
	</tr>

	

	<%=uiSearchInputTR%>>
		<%=uiSearchInputTDHead%>>
			
         &nbsp;&nbsp;&nbsp;&nbsp;创建时间：
       <%=framework.custom.UIManager.generateDateInput("i_StartCreate", event.viewStartCreate())%>  至 <%=framework.custom.UIManager.generateDateInput("i_EndCreate", event.viewEndCreate())%>
            <!--  <input type="text" class="texts" name="i_CreateTime" size="20" value="<%=event.viewCreateTime()%>" key_tab="<%=key_tab++%>">-->
        
        </td>		
	</tr>
   
<!-- 
	<%=uiSearchInputTR%>>
		<%=uiSearchInputTDHead%>>
			是否有效：
		</td>
		<%=uiSearchInputTDHead%>>
			<input type="text" class="texts" name="i_Status" size="20" value="<%=event.viewStatus()%>" key_tab="<%=key_tab++%>">
		</td>		
	</tr>

	<%=uiSearchInputTR%>>
		<%=uiSearchInputTDHead%>>
			创建人序号：
		</td>
		<%=uiSearchInputTDHead%>>
			<input type="text" class="texts" name="i_CreateUserId" size="20" value="<%=event.viewCreateUserId()%>" key_tab="<%=key_tab++%>">
		</td>		
	</tr>

	<%=uiSearchInputTR%>>
		<%=uiSearchInputTDHead%>>
			创建人：
		</td>
		<%=uiSearchInputTDHead%>>
			<input type="text" class="texts" name="i_CreateUser" size="20" value="<%=event.viewCreateUser()%>" key_tab="<%=key_tab++%>">
		</td>		
	</tr>

	

	<%=uiSearchInputTR%>>
		<%=uiSearchInputTDHead%>>
			最后修改人序号：
		</td>
		<%=uiSearchInputTDHead%>>
			<input type="text" class="texts" name="i_LastUpdateUserId" size="20" value="<%=event.viewLastUpdateUserId()%>" key_tab="<%=key_tab++%>">
		</td>		
	</tr>

	<%=uiSearchInputTR%>>
		<%=uiSearchInputTDHead%>>
			最后修改人：
		</td>
		<%=uiSearchInputTDHead%>>
			<input type="text" class="texts" name="i_LastUpdateUser" size="20" value="<%=event.viewLastUpdateUser()%>" key_tab="<%=key_tab++%>">
		ID：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        
            <input type="text" class="texts" name="i_Id" size="20" value="<%=event.viewId()%>" key_tab="<%=key_tab++%>">
        </td>		
	</tr>

	<%=uiSearchInputTR%>>
		<%=uiSearchInputTDHead%>>
			最后修改时间：
		</td>
		<%=uiSearchInputTDHead%>>
			<input type="text" class="texts" name="i_LastUpdateTime" size="20" value="<%=event.viewLastUpdateTime()%>" key_tab="<%=key_tab++%>">
		</td>		
	</tr>
 -->

	<%=uiSearchInputTR%>>
		<%=uiSearchInputTDHead%>>
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;按排序：	
			<select name="i_OrderField">
				<option value="" <%=(event.getOrderField().equals("1"))?"selected":""%>>设置排序字段</option>
				
				
				
				<option value="DOWNLOADTYP" <%=(event.getOrderField().equals("DOWNLOADTYP"))?"selected":""%>>上传下载类型</option>
				
				<option value="WAREHOUSE_UINCODE" <%=(event.getOrderField().equals("WAREHOUSE_UINCODE"))?"selected":""%>>仓库统一编码</option>
				
				<option value="DATATABLE_NAME" <%=(event.getOrderField().equals("DATATABLE_NAME"))?"selected":""%>>数据表名</option>
				
				<option value="PARMSTYPE" <%=(event.getOrderField().equals("PARMSTYPE"))?"selected":""%>>参数类型</option>
				
				<option value="PARMSSTR" <%=(event.getOrderField().equals("PARMSSTR"))?"selected":""%>>数据文件</option>
				
				<option value="UPDOWN_STATE" <%=(event.getOrderField().equals("UPDOWN_STATE"))?"selected":""%>>上传下载状态</option>
                <option value="CREATE_TIME" <%=(event.getOrderField().equals("CREATE_TIME"))?"selected":""%>>创建时间</option>
				
				
                <!--  
                <option value="ID" <%=(event.getOrderField().equals("ID"))?"selected":""%>>ID</option>
                <option value="STATUS" <%=(event.getOrderField().equals("STATUS"))?"selected":""%>>是否有效</option>
				
				<option value="CREATE_USER_ID" <%=(event.getOrderField().equals("CREATE_USER_ID"))?"selected":""%>>创建人序号</option>
				
				<option value="CREATE_USER" <%=(event.getOrderField().equals("CREATE_USER"))?"selected":""%>>创建人</option>
				
				
				
				<option value="LAST_UPDATE_USER_ID" <%=(event.getOrderField().equals("LAST_UPDATE_USER_ID"))?"selected":""%>>最后修改人序号</option>
				
				<option value="LAST_UPDATE_USER" <%=(event.getOrderField().equals("LAST_UPDATE_USER"))?"selected":""%>>最后修改人</option>
				
				<option value="LAST_UPDATE_TIME" <%=(event.getOrderField().equals("LAST_UPDATE_TIME"))?"selected":""%>>最后修改时间</option>
                --> 
				
			</select>
            
			&nbsp;&nbsp;
			<input type="radio" name="i_OrderDesc" value="false" <%=(event.isOrderDesc()==false)?"checked":""%> >升序
			<input type="radio" name="i_OrderDesc" value="true"  <%=(event.isOrderDesc()==true)?"checked":""%>  >降序
            
			<input type="button" value="查询" class="buttons" onclick="doSearch();return false;">&nbsp;<input type="button" value="清空" class="buttons" onclick="doClearEvent();return false;">
		</td>
	</tr>

<%=uiSearchEnd%>

<!--列表标题-->
<%=UIManager.addListHeadTitle("客户端上传下载信息表列表")%>

<!--********************* Part6:List Area ***************-->

<%=uiListStart%>>

<%@ include file="/framework/list_foot.jsp"%>

<%
	int index = 1 ;
%>	
	<%=uiListHeadTR%>>
		<%=UIManager.addListHeadCheckBox() %>

		

		<%=UIManager.addListHead("上传下载类型",index++)%>

		<%=UIManager.addListHead("仓库统一编码",index++)%>

		<%=UIManager.addListHead("数据表名",index++)%>

		<%=UIManager.addListHead("参数类型",index++)%>

		<%=UIManager.addListHead("数据文件",index++)%>

		<%=UIManager.addListHead("上传下载状态",index++)%>
        <%=UIManager.addListHead("创建时间",index++)%>

		<!-- 
        <%=UIManager.addListHead("ID",index++)%>
        <%=UIManager.addListHead("是否有效",index++)%>

		<%=UIManager.addListHead("创建人序号",index++)%>

		<%=UIManager.addListHead("创建人",index++)%>

		

		<%=UIManager.addListHead("最后修改人序号",index++)%>

		<%=UIManager.addListHead("最后修改人",index++)%>

		<%=UIManager.addListHead("最后修改时间",index++)%>
        -->
     
		<%=UIManager.addListHead("操作",-1)%>  
	<%=uiListHeadTREnd%>>
	
	<!--data-->
<%
	for(int i=0;i<list.size();i++)
	{
		ServerDownupfileInfo obj = (ServerDownupfileInfo)list.get(i);
%>
	<%=uiListDataTR[i%2]%> align=center>
    	<%=uiListDataTD%>>
    		<input type="checkbox" name="ids" value="<%=obj.getId()%>">
    	</td>
    	<%=uiListDataTD%>><%=obj.viewDownloadtyp(con)%></td>
    
    	<%=uiListDataTD%>><%=obj.viewWarehouseUincode(con)%></td>
    
    	<%=uiListDataTD%>><%=obj.viewDatatableName(con)%></td>
    
    	<%=uiListDataTD%>><%=obj.viewParmstype(con)%></td>
    
    	<%=uiListDataTD%>>
        <% 
        if(!ConstDefine.EXCELFILE_CREATE_ERROR.equals(obj.getParmsstr()))
        {
        %>
            <a href="" onclick="doGetFile('<%=obj.viewParmsstr(con)%>');return false;">得到文件</a>
        <%
        }
        %>
        </td>
    
    	<%=uiListDataTD%>><%=obj.viewUpdownState(con)%></td>
        <%=uiListDataTD%>><%=obj.viewCreateTime(con)%></td>
        <!--
        <%=uiListDataTD%>><%=obj.viewId(con)%></td>
    	<%=uiListDataTD%>><%=obj.viewStatus(con)%></td>
    
    	<%=uiListDataTD%>><%=obj.viewCreateUserId(con)%></td>
    
    	<%=uiListDataTD%>><%=obj.viewCreateUser(con)%></td>
    	<%=uiListDataTD%>><%=obj.viewLastUpdateUserId(con)%></td>
    
    	<%=uiListDataTD%>><%=obj.viewLastUpdateUser(con)%></td>
    
    	<%=uiListDataTD%>><%=obj.viewLastUpdateTime(con)%></td>
        
  -->
    	<%=uiListDataTD%>>
    		<a href="" onclick="bizViewServerDownupfileInfo('<%=obj.getId()%>');return false;">浏览</a>
    	</td>
  	</tr>
<%	
	}
%>  

<%@ include file="/framework/list_foot2.jsp"%>

<%=uiListEnd%>


<!--********************* Part7:Action Area ***************-->
<%=uiCommandStart%>>
<!--
	<%=uiCommandTR%>>
		<%=uiCommandTD%>>
		<input type=button value="    添加   " class="buttons" onclick="doToAdd();return false;">
		
		<input type=button value="    复制   " class="buttons" onclick="doToCopy();return false;">
		
		<input type=button value="    修改   " class="buttons" onclick="doToUpdate();return false;">
		<input type=button value="    删除   " class="buttons" onclick="doDelete();return false;">
		</td>
	</tr>	
    -->
<%=uiCommandEnd%>
</form>
<form id=frmDown action="<%=Config.getSrv()%>" method="post"></form>


<%@ include file="/framework/foot.jsp"%>

<!--
	Author    :chengbiao.he
	FileName  :/system/base/ServerDownupfileInfoList.jsp
-->
